// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * EavFormFieldset generated by hbm2java
 */
@Entity
@Table(name = "eav_form_fieldset", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = {
		"type_id", "code" }))
public class EavFormFieldset implements java.io.Serializable {

	private Short fieldsetId;
	private EavFormType eavFormType;
	private String code;
	private int sortOrder;
	private Set eavFormElements = new HashSet(0);
	private Set eavFormFieldsetLabels = new HashSet(0);

	public EavFormFieldset() {
	}

	public EavFormFieldset(EavFormType eavFormType, String code, int sortOrder) {
		this.eavFormType = eavFormType;
		this.code = code;
		this.sortOrder = sortOrder;
	}

	public EavFormFieldset(EavFormType eavFormType, String code, int sortOrder,
			Set eavFormElements, Set eavFormFieldsetLabels) {
		this.eavFormType = eavFormType;
		this.code = code;
		this.sortOrder = sortOrder;
		this.eavFormElements = eavFormElements;
		this.eavFormFieldsetLabels = eavFormFieldsetLabels;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "fieldset_id", unique = true, nullable = false)
	public Short getFieldsetId() {
		return this.fieldsetId;
	}

	public void setFieldsetId(Short fieldsetId) {
		this.fieldsetId = fieldsetId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "type_id", nullable = false)
	public EavFormType getEavFormType() {
		return this.eavFormType;
	}

	public void setEavFormType(EavFormType eavFormType) {
		this.eavFormType = eavFormType;
	}

	@Column(name = "code", nullable = false, length = 64)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "sort_order", nullable = false)
	public int getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(int sortOrder) {
		this.sortOrder = sortOrder;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "eavFormFieldset")
	public Set getEavFormElements() {
		return this.eavFormElements;
	}

	public void setEavFormElements(Set eavFormElements) {
		this.eavFormElements = eavFormElements;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "eavFormFieldset")
	public Set getEavFormFieldsetLabels() {
		return this.eavFormFieldsetLabels;
	}

	public void setEavFormFieldsetLabels(Set eavFormFieldsetLabels) {
		this.eavFormFieldsetLabels = eavFormFieldsetLabels;
	}

}
